home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Day Cry
/
Day Cry CD.bin
/
oh_towns
/
fb386smp
/
bas
/
dosu.bas
< prev
next >
Wrap
BASIC Source File
|
1994-09-20
|
864b
|
29 lines
100 RANDOMIZE TIME
110 '
120 N=10:MAX=172:MIN=168
130 DIM DAT1(N),NA1$(N),DOSU(MAX-MIN)
140 DIM DAT2(N),NA2$(N)
150 FOR I=1 TO N
160 DAT1(I)=INT(RND*(MAX-MIN+1))+MIN:NA1$(I)=CHR$(I+&H40)+"îN"
170 NEXT
180 '
190 PRINT :PRINT "ôxÉöò¬òzâ\ü[âg"
200 PRINT :PRINT "É«ù±æO"
210 FOR I=1 TO N:PRINT USING"###:& & ###cm";I;NA1$(I);DAT1(I):NEXT
220 GOSUB *ôxÉöò¬òzâ\ü[âg
230 PRINT :PRINT "É«ù±îπ"
240 FOR I=1 TO N:PRINT USING"###:& & ###cm";I;NA2$(I);DAT2(I):NEXT
250 PRINT
260 END
270 '
280 *ôxÉöò¬òzâ\ü[âg
290 FOR I=0 TO MAX-MIN:DOSU(I)=0:NEXT
300 FOR I=1 TO N:DOSU(DAT1(I)-MIN)=DOSU(DAT1(I)-MIN)+1:NEXT 'ôxÉöé≡Æ▓é╫éΘ
310 FOR I=1 TO MAX-MIN:DOSU(I)=DOSU(I)+DOSU(I-1):NEXT 'ù▌É╧ôxÉöé≡Æ▓é╫éΘ
320 FOR I=N TO 1 STEP -1
330 K=DAT1(I)-MIN
340 DAT2(DOSU(K))=DAT1(I):NA2$(DOSU(K))=NA1$(I)
350 DOSU(K)=DOSU(K)-1
360 NEXT
370 RETURN